﻿function expandcollapse(obj, row) {
	var div = document.getElementById(obj);
	var img = document.getElementById('img' + obj);

	if (div.style.display == "none") {
		div.style.display = "block";
		if (row == 'alt') {
		    img.src = "../../Images/minus.gif";
		}
		else {
		    img.src = "../../Images/minus.gif";
		}
		img.alt = "Close to view other Customers";
	}
	else {
		div.style.display = "none";
		if (row == 'alt') {
		    img.src = "../../Images/plus.gif";
		}
		else {
		    img.src = "../../Images/plus.gif";
		}
		img.alt = "Expand to show Orders";
	}
}

function expandcollapse2(obj, row) {
	//debugger;
	var divx = document.getElementById(obj);
	var imgx = document.getElementById('img' + obj);

	if (divx.style.display == "none") {
		divx.style.display = "block";
		if (row == 'alt') {
		    imgx.src = "../../Images/minus.gif";
		}
		else {
		    imgx.src = "../../Images/minus.gif";
		}
		imgx.alt = "Close to view other Customers";
	}
	else {
		divx.style.display = "none";
		if (row == 'alt') {
		    imgx.src = "../../Images/plus.gif";
		}
		else {
		    imgx.src = "../../Images/plus.gif";
		}
		imgx.alt = "Expand to show Orders";
	}
}

function random(min, max) {

	return (Math.round((max - min) * Math.random() + min));
}
